package myJs.myPkg

import myJs.myPkg.jquery.JQuery

import scala.scalajs.js
import scala.language.implicitConversions
import scala.scalajs.js.JSConverters._
import scala.scalajs.js.annotation.JSImport
import scala.scalajs.js.annotation.JSImport.Namespace


/**
 * Created by yz on 2019/3/14
 */

@js.native
trait DatepickerJQuery extends js.Object {

  def datepicker(options: DatepickerOptions): JQuery = scalajs.js.native

  def datepicker(method: String,arg1:String): JQuery = scalajs.js.native

}

case class DatepickerOptions(
                              format:js.UndefOr[String]=js.undefined,
                              language:js.UndefOr[String]=js.undefined,
                              autoclose:js.UndefOr[Boolean]=js.undefined,
                              forceParse:js.UndefOr[Boolean]=js.undefined,
                              showOnFocus:js.UndefOr[Boolean]=js.undefined,
                              clearBtn:js.UndefOr[Boolean]=js.undefined,
                            )

trait DatepickerJQueryImplicits {

  implicit def implicitDatepickerJQuery(jq: JQuery) = {
    jq.asInstanceOf[DatepickerJQuery]
  }
}
